package com.lwm.mapper;

import com.lwm.domain.EarlyWarning;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 能效预警数据层
 */
public interface EarlyWarningMapper {

    /**
     * 插入
     *
     * @param earlyWarning 能效预警实体类
     * @return int 影响行数
     */
    int insert(EarlyWarning earlyWarning);

    /**
     * 根据id删除
     *
     * @param ids id集合
     * @return int 影响行数
     */
    int deleteByIds(@Param("ids") List<Long> ids);

    /**
     * 更新
     *
     * @param earlyWarning 能效预警实体类
     * @return int 影响行数
     */
    int update(EarlyWarning earlyWarning);

    /**
     * 查询所有
     *
     * @param earlyWarning 能效预警实体类
     * @return {@link List}<{@link EarlyWarning}>
     */
    List<EarlyWarning> selectAll(EarlyWarning earlyWarning);

    /**
     * 根据id查询
     *
     * @param id 能效预警id
     * @return {@link EarlyWarning}
     */
    EarlyWarning selectById(Long id);
}
